package com.duanjw.springcloud.seata.consumer.service.impl;

import com.duanjw.springcloud.seata.consumer.mapper.UserMapper;
import com.duanjw.springcloud.seata.consumer.service.UserService;
import org.springframework.stereotype.Service;

/**
 * 用户 ServiceImpl
 * @author duanjw
 */
@Service
public class UserServiceImpl implements UserService {
    private final UserMapper userMapper;

    public UserServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    /**
     * 根据id删除用户
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        return userMapper.deleteById(id);
    }
}
